package demo02;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-04-10
 * Time: 20:18
 */
//4.
public class Daily implements Runnable{
        @Override
        public void run() {
            Student student = new Student();
            for(int i=0;i<20;i++) {
                student.behavior();
                student.outcome();
            }
        }

    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(new Daily());
        for (int i = 0; i < 20; i++) {
            System.out.println("好好学习不能挂科");
            Thread.sleep(1);
        }
        t1.start();

    }
}

